import request from "@/utils/request";

//供应商列表
export function listSupplier(data) {
  return request({
    url: "/supplier/list",
    method: "post",
    data: data,
  });
}
//供应商新增
export function addSupplier(data) {
  return request({
    url: "/supplier/add",
    method: "post",
    data: data,
  });
}
//供应商详情
export function getByIdSupplier(data) {
  return request({
    url: "/supplier/getById",
    method: "post",
    data: data,
  });
}
//供应商删除
export function deleteByIdSupplier(data) {
  return request({
    url: "/supplier/deleteById",
    method: "post",
    data: data,
  });
}
//供应商导出

export const supplierExport = (data) => {
  return request({
    url: "/supplier/export",
    method: "post",
    data,
    responseType: "blob",
  });
};

// //供应商 下载模版

export const supplierTemplate = (data) => {
  return request({
    url: "/supplier/importTemplate",
    method: "post",
    data,
    responseType: "blob",
  });
};

//供应商导ru
export const supplierImport = (data) => {
  return request({
    url: "/supplier/importData",
    method: "post",
    data,
    responseType: "blob",
  });
};
